#ifndef TILE_H
#define TILE_H

#include <QIcon>
#include <QObject>
#include <QPixmap>
#include <QPoint>

#include "tile_sheet.h"

class Tile : public QObject {
  Q_OBJECT
  Q_PROPERTY(QString name READ name)
  Q_PROPERTY(QPixmap pixmap READ pixmap)
  Q_PROPERTY(QIcon icon READ icon)

 public:
  explicit Tile(const QString& name, int row, int col, TileSheet* parent = NULL);

  QString name() const;
  QPixmap pixmap(float magnification = 1.0f) const;
  QIcon icon(float magnification = 1.0f) const;
  QPoint position() const;

 private:
  TileSheet* sheet_;
  QString name_;
  int row_;
  int col_;
};

#endif // TILE_H
